import {HttpParamsProps} from "@/common/http";

export type TablePage<DataType> = {
    records?: DataType[],
    total?: number,
}


export type AnyParams<V> = { [key: string]: V }

export type AsyncSelectMethod = (props: HttpParamsProps) => Promise<Response>;

export type TableList<DataType> = {
    records?: DataType[],
}


export type HttpResponse<D> = {
    code: number,
    err?: { code: string, msg: string },
    data?: D,
}
export type SetLoadingType = (loading: boolean) => void
export type ActionType = (setLoading: SetLoadingType) => void | undefined
export type BaseEntity = {
    updateBy: string;
    updateTime: string;
    createBy: string;
    createTime: string;
}

